<style>
    Table {
        top: 100px;
    }
</style>
<template>
    <div>
        <Divider/>
        <Table
                highlight-row
                @on-row-dblclick="onRowDblclick"
                :columns="columns"
                :data="data">

        </Table>
    </div>
</template>

<script>

    const {ipcRenderer} = require('electron')

    export default {
        name: "CommentaryManage",
        // components: {RadioComponent},
        data() {
            return {
                columns: [
                    {
                        title: '',
                        key: 'aId'
                    },
                    {
                        title: '文章标题',
                        key: 'title'
                    },
                    {
                        title: '作者',
                        key: 'author',
                        width: 120
                    },
                    {
                        title: '未审核',
                        key: 'unauditedNum',
                        width: 100
                    }
                ],
                data: [],
                articleId: "0",
            }
        },
        methods: {
            listUnverify() {
                this.$http({
                    method: 'post',
                    url: this.apiBase + '/blog/commentary/sel_artical_manage',
                    data: {}
                })
                    .then(response => {
                        this.data = response.data.data.articalCountDTOS;
                        console.log(this.data)
                    })
                    .catch(error => {
                        console.log(error);
                    })
            },
            onRowDblclick(selection, row) {
                this.articleId=selection.aId;
                this.$router.push('/index/blog/commentary-list/' + this.articleId)
                console.log(this.articleId);
            }
        },
        mounted() {
            this.listUnverify();
        }
    }
</script>

<style scoped>

</style>